package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchFlowDataRecordsMapper;
import com.ruoyi.system.domain.DispatchFlowDataRecords;
import com.ruoyi.system.service.IDispatchFlowDataRecordsService;

/**
 * 流量数据记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchFlowDataRecordsServiceImpl implements IDispatchFlowDataRecordsService 
{
    @Autowired
    private DispatchFlowDataRecordsMapper dispatchFlowDataRecordsMapper;

    /**
     * 查询流量数据记录
     * 
     * @param flowDataRecordsId 流量数据记录主键
     * @return 流量数据记录
     */
    @Override
    public DispatchFlowDataRecords selectDispatchFlowDataRecordsByFlowDataRecordsId(Long flowDataRecordsId)
    {
        return dispatchFlowDataRecordsMapper.selectDispatchFlowDataRecordsByFlowDataRecordsId(flowDataRecordsId);
    }

    /**
     * 查询流量数据记录列表
     * 
     * @param dispatchFlowDataRecords 流量数据记录
     * @return 流量数据记录
     */
    @Override
    public List<DispatchFlowDataRecords> selectDispatchFlowDataRecordsList(DispatchFlowDataRecords dispatchFlowDataRecords)
    {
        return dispatchFlowDataRecordsMapper.selectDispatchFlowDataRecordsList(dispatchFlowDataRecords);
    }

    /**
     * 新增流量数据记录
     * 
     * @param dispatchFlowDataRecords 流量数据记录
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchFlowDataRecords(DispatchFlowDataRecords dispatchFlowDataRecords)
    {
        return dispatchFlowDataRecordsMapper.insertDispatchFlowDataRecords(dispatchFlowDataRecords);
    }

    /**
     * 修改流量数据记录
     * 
     * @param dispatchFlowDataRecords 流量数据记录
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchFlowDataRecords(DispatchFlowDataRecords dispatchFlowDataRecords)
    {
        return dispatchFlowDataRecordsMapper.updateDispatchFlowDataRecords(dispatchFlowDataRecords);
    }

    /**
     * 批量删除流量数据记录
     * 
     * @param flowDataRecordsIds 需要删除的流量数据记录主键
     * @return 结果
     */
    @Override
    public int deleteDispatchFlowDataRecordsByFlowDataRecordsIds(Long[] flowDataRecordsIds)
    {
        return dispatchFlowDataRecordsMapper.deleteDispatchFlowDataRecordsByFlowDataRecordsIds(flowDataRecordsIds);
    }

    /**
     * 删除流量数据记录信息
     * 
     * @param flowDataRecordsId 流量数据记录主键
     * @return 结果
     */
    @Override
    public int deleteDispatchFlowDataRecordsByFlowDataRecordsId(Long flowDataRecordsId)
    {
        return dispatchFlowDataRecordsMapper.deleteDispatchFlowDataRecordsByFlowDataRecordsId(flowDataRecordsId);
    }
}
